from django.urls import path
from django.contrib.auth.views import LogoutView
from . import views

urlpatterns = [
    path('', views.StudentListView.as_view(), name='student-list'),
    path('create/', views.StudentCreateView.as_view(), name='student-create'),
    path('update/<int:pk>/', views.StudentUpdateView.as_view(), name='student-update'),
    path('delete/<int:pk>/', views.StudentDeleteView.as_view(), name='student-delete'),
    path('login/', views.StudentLoginView.as_view(), name='login'),
    path('logout/', views.logout_view, name='logout'),
    path('teachers/', views.TeacherListView.as_view(), name='teacher-list'),
    path('teachers/create/', views.TeacherCreateView.as_view(), name='teacher-create'),
    path('teachers/update/<int:pk>/', views.TeacherUpdateView.as_view(), name='teacher-update'),
    path('teachers/delete/<int:pk>/', views.TeacherDeleteView.as_view(), name='teacher-delete'),
    path('courses/', views.CourseListView.as_view(), name='course-list'),
    path('courses/create/', views.CourseCreateView.as_view(), name='course-create'),
    path('courses/update/<int:pk>/', views.CourseUpdateView.as_view(), name='course-update'),
    path('courses/delete/<int:pk>/', views.CourseDeleteView.as_view(), name='course-delete'),
    path('courses/<int:course_id>/scores/', views.manage_scores, name='manage-scores'),
    path('courses/<int:course_id>/rate/', views.rate_teacher, name='rate-teacher'),
    path('teachers/<int:teacher_id>/ratings/', views.teacher_ratings, name='teacher-ratings'),
    path('teachers/<int:teacher_id>/ratings/detail/', views.teacher_ratings_detail, name='teacher-ratings-detail'),
] 